<?php
/*
 * Created on 2009/03/22
 *
 */
 
require_once(HOME_PATH.'smarty'.DIRECTORY_SEPARATOR.'libs'.DIRECTORY_SEPARATOR.'Smarty.class.php');

class Smarty_agent extends Smarty
{
	function Smarty_agent() 
	{
		parent::Smarty();
		$this->left_delimiter = "{/";
		$this->right_delimiter = "/}";

		//set paths
		$this->compile_dir = HOME_PATH.'smarty'.DIRECTORY_SEPARATOR.'templates_c'.DIRECTORY_SEPARATOR;
		$this->cache_dir = HOME_PATH.'smarty'.DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR;
		$this->config_dir = HOME_PATH.'templates'.DIRECTORY_SEPARATOR.TEMPLATE_DIR.DIRECTORY_SEPARATOR;
		
		//load smarty config file
		parent::config_load('config.properties');
		
		$templateURL = HOME_URL.'templates/'.TEMPLATE_DIR.'/';
		
		$this->template_dir = HOME_PATH.'templates'.DIRECTORY_SEPARATOR.TEMPLATE_DIR.DIRECTORY_SEPARATOR;
		
		parent::assign('DIRECTORY_SEPARATOR', DIRECTORY_SEPARATOR);
		parent::assign('P_INDEX', P_INDEX);
		parent::assign('templatePath', $templateURL);
	}
}
?>
